﻿@model SailHero.Soft.FrameWork.Models.SYS_ROLE

@{
    ViewBag.Title = "新增角色";
    Layout = "../Shared/_Layout.cshtml";
}
<script type="text/javascript">

    $(function () {
        $("#save").click(function () {


            var roleName = $("#RoleName").val();
            var remark = $("#Remark").val();

            if (roleName == "") {
                $.messager.alert("提示信息", "角色名称不能为空", "info");
                return false;
            }
            else {
                var url = "/Role/Create2";
                $.post(url, {
                    RoleName: escape(roleName)
                    , Remark: escape(remark)
                },
                function (data) {
                    if (data == "success") {
                        window.location.href = "/Role/Index";
                    }
                    else {
                        $.messager.alert("错误信息", data, "error");
                    }
                });
            }
        });
    });
    </script>

<div id="main_zone">
  <table width="99%" style="text-align:left;" border="0" align="center"  cellpadding="3" cellspacing="1">
      <tr>
          <td width="18%" class="left_title_1">
              <font color="red">*</font>&nbsp;角色名称
          </td>
          <td width="32%">@Html.TextBoxFor(model=>model.ROLENAME)
          </td>
          <td width="18%" class="left_title_1">
              描述
          </td>
          <td width="32%">@Html.TextAreaFor(model => model.REMARK, new { style="width:250px;height:50px;"})
          </td>
      </tr>
    <tr>
      <td colspan="4" class="left_title_2" style="text-align:center;">
      <a id="save" class="easyui-linkbutton">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
       @Html.ActionLink("取消", "Index", "Role", null, new { @class = "easyui-linkbutton" })
      </td>
    </tr> 
  </table>
</div>